From 83d7cbcd071f694f0f0c8fcd7101cf6f022945b2 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Sat, 21 Apr 2007 11:37:34 +0100 Subject: [PATCH] xenstored: Only dom0 can do XS_DEBUG in non-test environments. Signed-off-by: Keir Fraser --- tools/xenstore/xenstored_core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 461395832a..d128884221 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -1163,6 +1163,13 @@ static void do_debug(struct connection *conn, struct buffered_data *in) { int num; +#ifndef TESTING + if (conn->id != 0) { + send_error(conn, EACCES); + return; + } +#endif + num = xs_count_strings(in->buffer, in->used); if (streq(in->buffer, "print")) { -- 2.30.2